package com.tao.flower.controller;

import com.alibaba.druid.pool.DruidDataSource;
import com.tao.flower.pojo.User;
import com.tao.flower.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {
    @Autowired
    IndexService indexService;

    @GetMapping("/hello")
    public User hello(){
        User user = indexService.getById(1);
        System.out.println(user);
        return user;
    }
}
